package com.hu.bgp.client.widgets;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.hu.bgp.shared.ClientGameType;

public class GameTypeTableAdmin extends GameTypeTable
{
	public Label[] createHeader()
	{
		return new Label[]
		{
			new Label("Alias"), new Label("Player count"), new Label("Status")
		};
	}

	public Widget[] createRow(ClientGameType gameType)
	{
		String state = gameType.isActive() ? "activated" : "deactivated";
		return new Widget[]
		{
			new Label(gameType.getAlias()), new Label("" + gameType.getPlayerCount()), new Label(state)
		};
	}
}
